package com.kexio.enterprise.integration.file.result;

import java.io.InputStream;
import java.time.LocalDateTime;
import java.util.Map;

/**
 * 文件下载结果
 * 
 * @author Kexio
 * @since 1.0.0
 */
public class FileDownloadResult {
    private boolean success;
    private String fileId;
    private String fileName;
    private String filePath;
    private InputStream inputStream;
    private byte[] fileBytes;
    private String contentType;
    private long fileSize;
    private String etag;
    private LocalDateTime lastModified;
    private String errorMessage;
    private Map<String, String> metadata;

    public FileDownloadResult() {
    }

    public FileDownloadResult(boolean success, String fileId) {
        this.success = success;
        this.fileId = fileId;
    }

    // Getters and Setters
    public boolean isSuccess() { return success; }
    public void setSuccess(boolean success) { this.success = success; }
    
    public String getFileId() { return fileId; }
    public void setFileId(String fileId) { this.fileId = fileId; }
    
    public String getFileName() { return fileName; }
    public void setFileName(String fileName) { this.fileName = fileName; }
    
    public String getFilePath() { return filePath; }
    public void setFilePath(String filePath) { this.filePath = filePath; }
    
    public InputStream getInputStream() { return inputStream; }
    public void setInputStream(InputStream inputStream) { this.inputStream = inputStream; }
    
    public byte[] getFileBytes() { return fileBytes; }
    public void setFileBytes(byte[] fileBytes) { this.fileBytes = fileBytes; }
    
    public String getContentType() { return contentType; }
    public void setContentType(String contentType) { this.contentType = contentType; }
    
    public long getFileSize() { return fileSize; }
    public void setFileSize(long fileSize) { this.fileSize = fileSize; }
    
    public String getEtag() { return etag; }
    public void setEtag(String etag) { this.etag = etag; }
    
    public LocalDateTime getLastModified() { return lastModified; }
    public void setLastModified(LocalDateTime lastModified) { this.lastModified = lastModified; }
    
    public String getErrorMessage() { return errorMessage; }
    public void setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; }
    
    public Map<String, String> getMetadata() { return metadata; }
    public void setMetadata(Map<String, String> metadata) { this.metadata = metadata; }
}
